namespace Stack
{
    public class Node<T>
    {
        public T Data { get; set; } //数据域
        public Node<T> Next { get; set; } //引用域
                                          //构造器
        public Node(T val, Node<T> p)
        {
            Data = val;
            Next = p;
        }
        //构造器
        public Node(Node<T> p)
        {
            Next = p;
        }
        //构造器
        public Node(T val)
        {
            Data = val;
            Next = null;
        }
        //构造器
        public Node()
        {
            Data = default(T);
            Next = null;
        }
    }
}
